<!DOCTYPE html>
<html lang="en">
  <head>
    <title>
        Java-Se-面向对象 - rulerLwx Blog
      </title>
        <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
      content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-transform" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no,email=no,adress=no">
    
    <meta name="theme-color" content="#000000" />
    
    <meta http-equiv="window-target" content="_top" />
    
    
    <meta name="description" content="构造器 Java类 必须包含一个或一个以上的构造方法 如果程序员没有为一个类编写构造方法，则系统会为该类提供一个默认的且无参的构造方法。 一旦程序员" />
    <meta name="generator" content="Hugo 0.73.0 with theme pure" />
    <title>Java-Se-面向对象 - rulerLwx Blog</title>
    
    
    <link rel="stylesheet" href="https://rulerLwx.gitee.io/css/style.min.c4bc7071f132c964c2116bca53b392933f377e5ca7b7051ed245187c621a2d3e.css">
    
    <link rel="stylesheet" href="https://cdn.staticfile.org/highlight.js/9.15.10/styles/github.min.css" async>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.4.2/tocbot.css" async>
    <meta property="og:title" content="Java-Se-面向对象" />
<meta property="og:description" content="构造器 Java类 必须包含一个或一个以上的构造方法 如果程序员没有为一个类编写构造方法，则系统会为该类提供一个默认的且无参的构造方法。 一旦程序员" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://rulerLwx.gitee.io/2017/07/java-se-%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1/" />
<meta property="article:published_time" content="2017-07-01T11:12:47+08:00" />
<meta property="article:modified_time" content="2017-07-01T11:12:47+08:00" />
<meta itemprop="name" content="Java-Se-面向对象">
<meta itemprop="description" content="构造器 Java类 必须包含一个或一个以上的构造方法 如果程序员没有为一个类编写构造方法，则系统会为该类提供一个默认的且无参的构造方法。 一旦程序员">
<meta itemprop="datePublished" content="2017-07-01T11:12:47&#43;08:00" />
<meta itemprop="dateModified" content="2017-07-01T11:12:47&#43;08:00" />
<meta itemprop="wordCount" content="2474">



<meta itemprop="keywords" content="," /><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Java-Se-面向对象"/>
<meta name="twitter:description" content="构造器 Java类 必须包含一个或一个以上的构造方法 如果程序员没有为一个类编写构造方法，则系统会为该类提供一个默认的且无参的构造方法。 一旦程序员"/>

    <!--[if lte IE 9]>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/classlist/1.1.20170427/classList.min.js"></script>
      <![endif]-->

    <!--[if lt IE 9]>
        <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
      <![endif]-->
  </head>

  
  

  <body class="main-center theme-black" itemscope itemtype="http://schema.org/WebPage"><header class="header" itemscope itemtype="http://schema.org/WPHeader">
    <div class="slimContent">
      <div class="navbar-header">
        <div class="profile-block text-center">
          <a id="avatar" href="https://gitee.com/rulerLwx" target="_blank">
            <img class="img-circle img-rotate" src="https://rulerLwx.gitee.io/avatar.png" width="200" height="200">
          </a>
          <h2 id="name" class="hidden-xs hidden-sm">rulerLwx</h2>
          <h3 id="title" class="hidden-xs hidden-sm hidden-md">thinking...</h3>
          <small id="location" class="text-muted hidden-xs hidden-sm"><i class="icon icon-map-marker"></i>Guangzhou, China</small>
        </div><div class="search" id="search-form-wrap">
    <form class="search-form sidebar-form">
        <div class="input-group">
            <input type="text" class="search-form-input form-control" placeholder="Search" />
            <span class="input-group-btn">
                <button type="submit" class="search-form-submit btn btn-flat" onclick="return false;"><i
                        class="icon icon-search"></i></button>
            </span>
        </div>
        <div class="ins-search">
            <div class="ins-search-mask"></div>
            <div class="ins-search-container">
                <div class="ins-input-wrapper">
                    <input type="text" class="ins-search-input" placeholder="Type something..."
                        x-webkit-speech />
                    <button type="button" class="close ins-close ins-selectable" data-dismiss="modal"
                        aria-label="Close"><span aria-hidden="true">×</span></button>
                </div>
                <div class="ins-section-wrapper">
                    <div class="ins-section-container"></div>
                </div>
            </div>
        </div>
    </form>
</div>
        <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target="#main-navbar" aria-controls="main-navbar" aria-expanded="false">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
      </div>
      <nav id="main-navbar" class="collapse navbar-collapse" itemscope itemtype="http://schema.org/SiteNavigationElement" role="navigation">
        <ul class="nav navbar-nav main-nav">
            <li class="menu-item menu-item-home">
                <a href="/">
                    <i class="icon icon-home-fill"></i>
                  <span class="menu-title">Home</span>
                </a>
            </li>
            <li class="menu-item menu-item-archives">
                <a href="/posts/">
                    <i class="icon icon-archives-fill"></i>
                  <span class="menu-title">Archives</span>
                </a>
            </li>
            <li class="menu-item menu-item-categories">
                <a href="/categories/">
                    <i class="icon icon-folder"></i>
                  <span class="menu-title">Categories</span>
                </a>
            </li>
            <li class="menu-item menu-item-tags">
                <a href="/tags/">
                    <i class="icon icon-tags"></i>
                  <span class="menu-title">Tags</span>
                </a>
            </li>
            <li class="menu-item menu-item-about">
                <a href="/about/">
                    <i class="icon icon-cup-fill"></i>
                  <span class="menu-title">About</span>
                </a>
            </li>
        </ul>
      </nav>
    </div>
  </header>

<aside class="sidebar" itemscope itemtype="http://schema.org/WPSideBar">
  <div class="slimContent">
    
      <div class="widget">
    <h3 class="widget-title">Board</h3>
    <div class="widget-body">
        <div id="board">
            <div class="content">enjoy~
            </div>
        </div>
    </div>
</div>

      <div class="widget">
    <h3 class="widget-title"> Categories</h3>
    <div class="widget-body">
        <ul class="category-list">
            <li class="category-list-item"><a href="https://rulerLwx.gitee.io/categories/java-framework/" class="category-list-link">java-framework</a><span class="category-list-count">38</span></li>
            <li class="category-list-item"><a href="https://rulerLwx.gitee.io/categories/java-front-end/" class="category-list-link">java-front-end</a><span class="category-list-count">11</span></li>
            <li class="category-list-item"><a href="https://rulerLwx.gitee.io/categories/java-se/" class="category-list-link">java-se</a><span class="category-list-count">21</span></li>
            <li class="category-list-item"><a href="https://rulerLwx.gitee.io/categories/java-senior/" class="category-list-link">java-senior</a><span class="category-list-count">4</span></li>
            <li class="category-list-item"><a href="https://rulerLwx.gitee.io/categories/linux/" class="category-list-link">linux</a><span class="category-list-count">13</span></li>
            <li class="category-list-item"><a href="https://rulerLwx.gitee.io/categories/tools/" class="category-list-link">tools</a><span class="category-list-count">1</span></li>
            <li class="category-list-item"><a href="https://rulerLwx.gitee.io/categories/%E6%8A%80%E6%9C%AF%E6%9D%82%E7%83%A9/" class="category-list-link">技术杂烩</a><span class="category-list-count">4</span></li>
            <li class="category-list-item"><a href="https://rulerLwx.gitee.io/categories/%E6%95%B0%E6%8D%AE%E5%BA%93/" class="category-list-link">数据库</a><span class="category-list-count">15</span></li>
        </ul>
    </div>
</div>
      <div class="widget">
    <h3 class="widget-title"> Tags</h3>
    <div class="widget-body">
        <ul class="tag-list">
            
            
            <li class="tag-list-item"><a href="https://rulerLwx.gitee.io/tags/jvm/" class="tag-list-link">jvm</a><span
                    class="tag-list-count">1</span></li>
            
            
            <li class="tag-list-item"><a href="https://rulerLwx.gitee.io/tags/%E5%A4%9A%E7%BA%BF%E7%A8%8B/" class="tag-list-link">多线程</a><span
                    class="tag-list-count">2</span></li>
            
            
            <li class="tag-list-item"><a href="https://rulerLwx.gitee.io/tags/%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B/" class="tag-list-link">网络编程</a><span
                    class="tag-list-count">3</span></li>
            
        </ul>

    </div>
</div>
      
<div class="widget">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget-body">
        <ul class="recent-post-list list-unstyled no-thumbnail">
            <li>
                <div class="item-inner">
                    <p class="item-title">
                        <a href="https://rulerLwx.gitee.io/2020/07/%E8%87%AA%E5%B7%B1%E5%8A%A8%E6%89%8B%E4%B8%80%E6%89%B9%E9%87%8F%E7%A7%BB%E5%8A%A8%E9%87%8D%E5%91%BD%E5%90%8D%E6%96%87%E4%BB%B6/" class="title">自己动手（一）——批量移动、重命名文件</a>
                    </p>
                    <p class="item-date">
                        <time datetime="2020-07-27 17:50:02 &#43;0800 CST" itemprop="datePublished">2020-07-27</time>
                    </p>
                </div>
            </li>
            <li>
                <div class="item-inner">
                    <p class="item-title">
                        <a href="https://rulerLwx.gitee.io/2020/07/%E5%85%B3%E4%BA%8Einteger%E7%9A%84-128~127%E7%BC%93%E5%AD%98/" class="title">关于Integer的 -128~127缓存</a>
                    </p>
                    <p class="item-date">
                        <time datetime="2020-07-11 16:56:21 &#43;0800 CST" itemprop="datePublished">2020-07-11</time>
                    </p>
                </div>
            </li>
            <li>
                <div class="item-inner">
                    <p class="item-title">
                        <a href="https://rulerLwx.gitee.io/2020/07/%E8%B7%A8%E5%9F%9F%E9%97%AE%E9%A2%98/" class="title">跨域问题</a>
                    </p>
                    <p class="item-date">
                        <time datetime="2020-07-08 22:41:12 &#43;0800 CST" itemprop="datePublished">2020-07-08</time>
                    </p>
                </div>
            </li>
            <li>
                <div class="item-inner">
                    <p class="item-title">
                        <a href="https://rulerLwx.gitee.io/2020/07/%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/" class="title">个人博客搭建</a>
                    </p>
                    <p class="item-date">
                        <time datetime="2020-07-05 18:58:47 &#43;0800 CST" itemprop="datePublished">2020-07-05</time>
                    </p>
                </div>
            </li>
            <li>
                <div class="item-inner">
                    <p class="item-title">
                        <a href="https://rulerLwx.gitee.io/2020/07/mongodb-1/" class="title">MonggoDB-1</a>
                    </p>
                    <p class="item-date">
                        <time datetime="2020-07-03 18:58:47 &#43;0800 CST" itemprop="datePublished">2020-07-03</time>
                    </p>
                </div>
            </li>
        </ul>
    </div>
</div>
  </div>
</aside>

    
    
<aside class="sidebar sidebar-toc collapse" id="collapseToc" itemscope itemtype="http://schema.org/WPSideBar">
  <div class="slimContent">
    <h4 class="toc-title">Catalogue</h4>
    <nav id="toc" class="js-toc toc">

    </nav>
  </div>
</aside>
<main class="main" role="main"><div class="content">
  <article id="-" class="article article-type-" itemscope
    itemtype="http://schema.org/BlogPosting">
    
    <div class="article-header">
      <h1 itemprop="name">
  <a
    class="article-title"
    href="/2017/07/java-se-%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1/"
    >Java-Se-面向对象</a
  >
</h1>

      <div class="article-meta">
        
<span class="article-date">
  <i class="icon icon-calendar-check"></i>&nbsp;
<a href="https://rulerLwx.gitee.io/2017/07/java-se-%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1/" class="article-date">
  <time datetime="2017-07-01 11:12:47 &#43;0800 CST" itemprop="datePublished">2017-07-01</time>
</a>
</span>
<span class="article-category">
  <i class="icon icon-folder"></i>&nbsp;
  <a class="article-category-link" href="/categories/java-se/"> Java-Se </a>
</span>  
  <span class="article-tag">
    <i class="icon icon-tags"></i>&nbsp;
    <a class="article-tag-link" href="/tags//">  </a>
  </span>

        <span class="post-comment"><i class="icon icon-comment"></i>&nbsp;<a href="/2017/07/java-se-%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1/#comments"
            class="article-comment-link">Comments</a></span>
		<span class="post-wordcount hidden-xs" itemprop="wordCount">Word Count: 2474words</span>
		<span class="post-readcount hidden-xs" itemprop="timeRequired">Read Count: 5minutes </span>
      </div>
    </div>
    <div class="article-entry marked-body js-toc-content" itemprop="articleBody">
      <h1 id="构造器">构造器</h1>
<p>Java类 必须包含一个或一个以上的构造方法</p>
<p>如果程序员没有为一个类编写构造方法，则系统会为该类提供一个默认的且无参的构造方法。</p>
<p>一旦程序员为一个类提供了构造方法，系统将不再为该类提供构造方法。</p>
<h1 id="面向对象的特点">面向对象的特点</h1>
<p>封装、继承、多态。</p>
<h2 id="封装">封装</h2>
<p>访问控制符（针对方法、变量）：</p>
<p><img src="https://oscimg.oschina.net/oscnet/e6e63f78b1654f8fce88ba82473aced3b9b.jpg" alt="decorate" title="decorate"></p>
<h2 id="继承">继承</h2>
<p>子类不能获得父类的构造器。</p>
<p>多继承：接口与接口之间可以多继承。</p>
<p>继承后，子类可以获得父类中除private修饰外的所有方法（静态、非静态）、属性（静态、非静态）。如果子类的静态方法、静态属性跟父类一致，则父类相应的静态方法、静态属性被隐藏，子类可以通过“父类.静态XXX”来访问。</p>
<h2 id="多态">多态</h2>
<p>一句话：只有非静态方法具有多态性，常量、静态方法等不具有多态。</p>
<h3 id="方法重写与重载">方法重写与重载</h3>
<p>重写：两同两小一大<br>
1）两同：方法名相同、形参列表相同<br>
2）两小：返回值类型比父类更小或相同、抛出的异常比父类更小或相等<br>
3）一大：访问修饰符比父类更大或相等</p>
<p>重载：两同一不同<br>
1）两同：同一个类同方法名<br>
2）参数列表不同</p>
<p>重载发生在同一个类中，重写发生在子父类的继承中。两者之间没有可比性。</p>
<h1 id="接口">接口</h1>
<h2 id="通用">通用</h2>
<p>接口的成员特点：<br>
1）成员变量 只能是常量。默认修饰符 public static final<br>
2）成员方法 只能是抽象方法。默认修饰符 public abstract</p>
<p>注：这些修饰符可以省略不写。</p>
<h2 id="jdk8">JDK8</h2>
<p>接口可以定义类（static）方法、默认（default）方法。</p>
<h1 id="类">类</h1>
<p>类的修饰符有public/abstract/final</p>
<h2 id="命名">命名</h2>
<p>Java 标识符有如下命名规则：</p>
<ul>
<li>由26个英文字母大小写，数字：0-9，符号：_ $ 组成。（简记：字母、数字、两个符号）</li>
<li>标识符应以 **字母、_ 、$** 开头。（简记：除数字外，其它两种可以开关）</li>
<li>标识符不能是关键字</li>
</ul>
<p>Java中严格区分大小写</p>
<p>关于 javac xxx ，其中 xxx 不区分大小写，也就是 <code>javac MyTest.java</code> 与 <code>javac mytest.java</code> 都正常编译通过。 —— 20191104</p>
<h2 id="内部类">内部类</h2>
<h3 id="分类">分类</h3>
<p>内部类分为</p>
<ul>
<li>成员内部类，包括：静态内部类和非静态内部类</li>
<li>非成员内部类，包括：局部内部类和匿名内部类</li>
</ul>
<p>非静态内部类可以访问外部类的成员变量（<strong>实例变量、类变量</strong>），包括<strong>private修饰的实例变量</strong>。</p>
<p>不允许外部类的静态成员中直接使用非静态内部类，不允许在非静态内部类里定义静态成员。（重点 ——20191025）</p>
<p>静态内部类，可以包含静态成员，也可以包含非静态成员。</p>
<p>局部内部类和匿名内部类访问局部变量时，局部变量要用final修饰。java8则会为局部变量自动添加final修饰（effectively final）。</p>
<pre><code class="language-java">private Animator createAnimatorView(final View view, final int position) {
    MyAnimator animator = new MyAnimator();
    animator.addListener(new AnimatorListener() {
        @Override
        public void onAnimationEnd(Animator arg0) {
            Log.d(TAG, &quot;position=&quot; + position); 
        }
    });
    return animator;
}
</code></pre>
<h3 id="图解">图解</h3>
<p><img src="https://gitee.com/rulerLwx/PicGo/raw/master/img/20200707183348.png" alt=""></p>
<p>参考：https://www.nowcoder.com/test/question/done?tid=25024105&amp;qid=252898#summary</p>
<h3 id="陷阱">陷阱</h3>
<p>下面的程序会报错：</p>
<pre><code class="language-java">public class Outer {

    class Inner {}

    public static void foo() { new Inner(); }//编译错误

    public void bar() { new Inner(); }

    public static void main(String[] args) {
        new Inner();//编译错误
    }
}
</code></pre>
<p>可以这样理解：Inner内部类看作Outer 的非静态成员，按照“静态成员不能访问非静态成员”，所以报错了。
如果非要在静态方法中访问非静态的内部类，可以这样做：<code>new Outer().new Inner();</code></p>
<p>由此看出，调用非静态内部类时，要包含有外部类的引用（this）。</p>
<p>问：非静态的方法实例化非静态内部类时，为什么不用传外部类的this？<br>
答：非静态的方法是实例方法，实例方法被调用的前提是已经创建好了外部类的实例。所以，此时不用传this。</p>
<h1 id="流程控制">流程控制</h1>
<h2 id="三目运算">三目运算</h2>
<ul>
<li><code>System.out.println(1 &lt; 2 ? 1:2);</code></li>
</ul>
<h2 id="针对循环进行优化">针对循环进行优化</h2>
<p>死代码删除，代码外提，强度削弱，删除归纳变量，复写传播</p>
<p><a href="https://www.nowcoder.com/test/question/done?tid=28827378&amp;qid=304509#summary">https://www.nowcoder.com/test/question/done?tid=28827378&amp;qid=304509#summary</a></p>
<h1 id="值传递--引用传递">值传递 &amp; 引用传递</h1>
<p>总结：在方法的形参中，都是值传递，也就是副本传递，不同的是：“值传递”传递的是值的副本，“引用传递”传递的是地址。在此特别注意，对于“引用传递”，如果在方法中只是对地址进行运算或处理，则不会影响原引用中的值；如果<strong>对地址对应的对象中的值进行操作</strong>，则会改变原引用中的值。——20191016</p>
<p>一句话，只有对引用的对象里面的值进行操作才会改变原引用。——20191016</p>
<pre><code class="language-java">public class MyTest2 {
    public static void main(String[] args) {
        StringBuffer a = new StringBuffer(&quot;A&quot;);
        StringBuffer b = new StringBuffer(&quot;B&quot;);
        MyTest2 t = new MyTest2();
        t. caculate(a, b);
        System.out.println(a + &quot;,&quot; + b);
    }

    private void caculate(StringBuffer a, StringBuffer b) {
        // 第一种，输出 AB,B
//        a.append(b);
//        b = a;

        // 第二种，输出 AB,BAB
        a.append(b);
        b.append(a);
    }
}
</code></pre>
<p>另一个经典题：</p>
<pre><code class="language-java">public class Example {
    String str = new String(&quot;good&quot;);
    char[] ch = {'a', 'b', 'c'};

    public static void main(String[] args) {
        Example ex = new Example();
        ex.change(ex.str, ex.ch);
        System.out.print(ex.str + &quot; and &quot;);
        System.out.println(ex.ch);
    }

    public void change(String str, char[] ch) {
        str = &quot;test ok&quot;;
        ch[0] = 'g';
    }
}
</code></pre>
<p>答案：good and gbc</p>
<h1 id="q--a">Q &amp; A</h1>
<h2 id="与equal的区别">==与equal的区别</h2>
<p>1、如果是基本数据类型，用 ==，如果是对应的包装类型，强烈建议用 equals，因为缓存问题（-128~127） ——20191119</p>
<p>2、如果是引用类型</p>
<p>==：比较的是两个对象的地址，equal：比较的是两个值</p>
<pre><code>public class test {
 public static void main(String[] args) {
      Person p1 = new Person();
      Person p2 = new Person();
      p1.setId(100);
      p2.setId(100);
      System.out.println(p1.equals(p2));//false
      System.out.println(p1 == p2);//false
 }
}
</code></pre>
<p>String字符串的缓存问题？？？？</p>
<p>答：JVM使用常量池来管理字符串，当使用<code>new String(&quot;hello&quot;)</code>时，JVM会使用常理池管理“hello”直接量，再创建一个String对象保存在堆内存中。一个在常量池，一个在堆内存。</p>
<p>示例代码：</p>
<pre><code class="language-java">public class StringCompareTest
{
	public static void main(String[] args)
	{
		// s1直接引用常量池中的&quot;疯狂Java&quot;
		String s1 = &quot;疯狂Java&quot;;
		String s2 = &quot;疯狂&quot;;
		String s3 = &quot;Java&quot;;
		// s4后面的字符串值可以在编译时就确定下来
		// s4直接引用常量池中的&quot;疯狂Java&quot;
		String s4 = &quot;疯狂&quot; + &quot;Java&quot;;
		// s5后面的字符串值可以在编译时就确定下来
		// s5直接引用常量池中的&quot;疯狂Java&quot;
		String s5 = &quot;疯&quot; + &quot;狂&quot; + &quot;Java&quot;;
		// s6后面的字符串值不能在编译时就确定下来，
		// 不能引用常量池中的字符串
		String s6 = s2 + s3;
		// 使用new调用构造器将会创建一个新的String对象，
		// s7引用堆内存中新创建的String对象
		String s7 = new String(&quot;疯狂Java&quot;);
		System.out.println(s1 == s4); // 输出true
		System.out.println(s1 == s5); // 输出true
		System.out.println(s1 == s6); // 输出false
		System.out.println(s1 == s7); // 输出false
	}
}
</code></pre>
<h2 id="has-a--is-a--like-a">has-a &amp; is-a &amp; like-a</h2>
<ul>
<li>is-a：继承</li>
<li>has-a：组合</li>
</ul>
<p>参考：https://cloud.tencent.com/developer/ask/195015</p>

    </div>
    <div class="article-footer">
<blockquote class="mt-2x">
  <ul class="post-copyright list-unstyled">
    <li class="post-copyright-link hidden-xs">
      <strong>Permalink: </strong>
      <a href="https://rulerLwx.gitee.io/2017/07/java-se-%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1/" title="Java-Se-面向对象" target="_blank" rel="external">https://rulerLwx.gitee.io/2017/07/java-se-%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1/</a>
    </li>
    <li class="post-copyright-license">
      <strong>License：</strong><a href="http://creativecommons.org/licenses/by/4.0/deed.zh" target="_blank" rel="external">CC BY 4.0 CN</a>
    </li>
  </ul>
</blockquote>

<div class="panel panel-default panel-badger">
  <div class="panel-body">
    <figure class="media">
      <div class="media-left">
        <a href="https://gitee.com/rulerLwx" target="_blank" class="img-burn thumb-sm visible-lg">
          <img src="https://rulerLwx.gitee.io/avatar.png" class="img-rounded w-full" alt="">
        </a>
      </div>
      <div class="media-body">
        <h3 class="media-heading"><a href="https://gitee.com/rulerLwx" target="_blank"><span class="text-dark">rulerLwx</span><small class="ml-1x">thinking...</small></a></h3>
        <div>Good Good Study, Day Day Up~</div>
      </div>
    </figure>
  </div>
</div>
    </div>
  </article>
<section id="comments">
    <div id="vcomments"></div>
</section>

</div><nav class="bar bar-footer clearfix" data-stick-bottom>
    <div class="bar-inner">
        <ul class="pager pull-left">
            <li class="prev">
                <a href="https://rulerLwx.gitee.io/2017/07/java-se-%E6%9E%9A%E4%B8%BE/" title="Java-Se-枚举"><i
                        class="icon icon-angle-left"
                        aria-hidden="true"></i><span>&nbsp;&nbsp;Older</span></a>
            </li>
            <li class="next">
                <a href="https://rulerLwx.gitee.io/2017/07/java-se-%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B-1/"
                    title="Java-Se-网络编程-1"><span>Newer&nbsp;&nbsp;</span><i
                        class="icon icon-angle-right" aria-hidden="true"></i></a>
            </li>
            
            <li class="toggle-toc">
                <a class="toggle-btn collapsed" data-toggle="collapse" href="#collapseToc" aria-expanded="false"
                    title="Catalogue" role="button">
                    <span>[&nbsp;</span><span>Catalogue</span>
                    <i class="text-collapsed icon icon-anchor"></i>
                    <i class="text-in icon icon-close"></i>
                    <span>]</span>
                </a>
            </li>
        </ul>
        <div class="bar-right">
            <div class="share-component" data-sites="weibo,qq,wechat"
                data-mobile-sites="weibo,qq,qzone"></div>
        </div>
    </div>
</nav>

</main><footer class="footer" itemscope itemtype="http://schema.org/WPFooter">
<ul class="social-links">
    <li><a href="https://gitee.com/rulerLwx" target="_blank" title="gitee" data-toggle=tooltip data-placement=top >
            <i class="icon icon-gitee"></i></a></li>
    <li><a href="https://github.com/wolf-lea" target="_blank" title="github" data-toggle=tooltip data-placement=top >
            <i class="icon icon-github"></i></a></li>
</ul>
  <div class="copyright">
    &copy;2017  -
    2020
    <div class="publishby">
        Theme by <a href="https://github.com/xiaoheiAh" target="_blank"> xiaoheiAh </a>base on<a href="https://github.com/xiaoheiAh/hugo-theme-pure" target="_blank"> pure</a>.
    </div>
  </div>
</footer>

<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_SVG"></script>
<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
            showMathMenu: false, //disables context menu
            tex2jax: {
            inlineMath: [ ['$','$'], ['\\(','\\)'] ]
           }
    });
</script>


<script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js"></script>
<script>
    window.jQuery || document.write('<script src="js/jquery.min.js"><\/script>')
</script>
<script type="text/javascript" src="https://cdn.staticfile.org/highlight.js/9.15.10/highlight.min.js"></script>
<script type="text/javascript" src="https://cdn.staticfile.org/highlight.js/9.15.10/languages/python.min.js" defer></script>
<script type="text/javascript" src="https://cdn.staticfile.org/highlight.js/9.15.10/languages/javascript.min.js" defer></script><script>
    hljs.configure({
        tabReplace: '    ', 
        classPrefix: ''     
        
    })
    hljs.initHighlightingOnLoad();
</script>
<script src="https://rulerLwx.gitee.io/js/application.min.bdeb64b910570b6c41badc6a05b7afb0c8ad9efd8525de3c7257d59e786326a3.js"></script>
<script src="https://rulerLwx.gitee.io/js/plugin.min.51ff8c7317566f82259170fa36e09c4493adc9b9378b427a01ad3f017ebac7dd.js"></script>

<script>
    (function (window) {
        var INSIGHT_CONFIG = {
            TRANSLATION: {
                POSTS: 'Posts',
                PAGES: 'Pages',
                CATEGORIES: 'Categories',
                TAGS: 'Tags',
                UNTITLED: '(Untitled)',
            },
            ROOT_URL: 'https:\/\/rulerLwx.gitee.io',
            CONTENT_URL: 'https:\/\/rulerLwx.gitee.io\/searchindex.json ',
        };
        window.INSIGHT_CONFIG = INSIGHT_CONFIG;
    })(window);
</script>
<script type="text/javascript" src="https://rulerLwx.gitee.io/js/insight.min.a343cd9a5a7698336b28ef3a7c16a3a1b1d2d5fb17dc8ed04022bbe08cc5459073a15bdafa3a8a58cdd56080784bdd69fa70b1ae8597565c799c57ed00f0e120.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.4.2/tocbot.min.js"></script>
<script>
    tocbot.init({
        
        tocSelector: '.js-toc',
        
        contentSelector: '.js-toc-content',
        
        headingSelector: 'h1, h2, h3',
        
        hasInnerContainers: true,
    });
</script>

<script src="https://cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/valine"></script>
<script type="text/javascript">
    var GUEST = ['nick', 'mail', 'link'];
    var meta = 'nick,mail';
    meta = meta.split(',').filter(function (item) {
        return GUEST.indexOf(item) > -1;
    });
    new Valine({
        el: '#vcomments',
        verify: null ,
        notify: null ,
        appId: 'IyAB0PSPRazTPDxitO1ddQ7O-gzGzoHsz',
        appKey: '5rBJTq4KidYF33eXwvRVhtEH',
        placeholder: 'enjoy~',
        avatar: 'mm',
        meta: meta,
        pageSize: '10' || 10,
        visitor: false 
});
</script>

  </body>
</html>
